package com.bcbim.smart_water.inspection.service;

import com.bcbim.smart_water.inspection.mapper.InspectionMapper;
import com.bcbim.smart_water_interface.inspection.dto.InspectionStatisticsDTO;
import com.bcbim.smart_water_interface.inspection.service.InspectionStatisticsService;
import com.bcbim.smart_water_interface.inspection.vo.InspectionStatisticsListVO;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service(timeout = 60 * 1000, group = "inspectionStatistics", version = "1.0.0")
public class InspectionStatisticsServiceImpl implements InspectionStatisticsService {

    @Autowired
    private InspectionMapper inspectionMapper;

    @Override
    public int countInspectionStatistics(InspectionStatisticsDTO inspectionStatisticsDTO) {
        return inspectionMapper.countInspectionStatistics(inspectionStatisticsDTO);
    }

    @Override
    public List<InspectionStatisticsListVO> listInspectionStatistics(InspectionStatisticsDTO inspectionStatisticsDTO) {
        return inspectionMapper.listInspectionStatistics(inspectionStatisticsDTO);
    }

    @Override
    public int countProblem(InspectionStatisticsDTO inspectionPositionDTO) {
        return inspectionMapper.countProblem(inspectionPositionDTO);
    }


}
